import { Button } from 'antd'
import './index.scss'

function DirBar ({ list, toggle, logOut }) {
  return <div className="dir-bar-page">
    <div className="chat-wrapper">
      {list.map(i => <div key={i} className="chat-item" onClick={() => toggle(i)}>聊天室{i}</div>)}
    </div>
    <div>
      <Button type="primary" onClick={logOut}>退出</Button>
    </div>
  </div>
}

export default DirBar
